# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-wilderness
pkgver=0.1.10
pkgrel=1
pkgdesc="Easy multi-level command line applications with man pages"
url="https://github.com/GjjvdBurg/wilderness"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('man-db')
source=("https://github.com/GjjvdBurg/wilderness/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('5924656e64c723e0533d24c34902006b053180e19ede92f865a9545abe1717e198f69fe7d036edcf261e29090d7ba9d9f8b50e6ba2108a2e0b6217915d736154')

build() {
  cd wilderness-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd wilderness-$pkgver
  python -m unittest discover
}

package() {
  cd wilderness-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
